package com.yanyu.space.member.listener.rocket;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.function.Consumer;

/**
 * @author gz
 */
@Slf4j
@Configuration
public class ConsumerNewTest {

    @Bean
    public Consumer<String> spaceconsumera() {
        return message -> {
            log.info("接收到消息", message);
            try {
                Thread.sleep(10000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            log.info("spaceconsumera消息：" + message);
        };
    }
}
